home *** CD-ROM | disk | FTP | other *** search
/ Modeling the Dream / Modeling the Dream CD - Walkthroughs and Flybys II (1994)(Waite Group).iso / spacebar / neumann.txt < prev    next >
Text File  |  1994-09-14  |  10KB  |  692 lines

  1. ;set debug on
  2.  
  3. ;                BIGDEMO.TXT
  4. ;                The Grasp control program for the BigDemo
  5. ;                (c) 1994 Waite Group Press
  6. set swappath "c:\temp"
  7. set maxcall on
  8. global playspeed 4
  9. global creddel 300
  10. global thispath "\\mtdtemp"
  11.  
  12. global cnt 0    ;count into playlist
  13. global sub ""    ;subroutine name
  14. global broken 0
  15.  
  16. if envdef(lmode)
  17.  global lmode 1    ;lmode is defined in environment, bigdemo does not loop
  18. else
  19.  global lmode 0 
  20. endif
  21.  
  22. init
  23. ;localise
  24. neumann
  25. . chdir(@c$"\\spacebar")
  26. return
  27.  
  28. neumann:
  29. global thispath "\\flics\\neumann\\"
  30. ;runmode                ;check in from CD or hard disk
  31. mp jump
  32. databegin
  33. "jumpan.fli" "jump01.fli" "rueckmo.fli" "eckgeh.fli" "eckrumo.fli" "jump01.fli"
  34. "salto01.fli" "jump01.fli" "jump03.fli" "rengeh00.fli" 
  35. dataend
  36. mark 10
  37.  playit @c$@thispath$@  
  38.  if @broken==1
  39.   break neuout
  40.  endif
  41. loop
  42. neuout:
  43. dfree d1
  44. midpak stop
  45. goto terminate
  46.  
  47.                 ;------------general subs start
  48.  
  49. fadedown:
  50. local vol 100
  51. mark 18
  52.  midpak volume @vol
  53.  set vol @vol-5
  54.  waitkey 5
  55. loop
  56. midpak stop
  57. midpak volume 100
  58. return
  59.  
  60.  
  61. init:
  62. video l
  63. global cr chr(10)$chr(13)               
  64. global ext ""
  65. local trip 1            ;does the sound play?, set to false
  66. . chdir(@c$"\\bigdemo")
  67. opengl @c$"\bigdemo\bigdemo.ovr"
  68. load midpak
  69. @midpak verify
  70. closegl
  71. if !@0
  72.  text "The MIDPAK.COM driver is not loaded!"$@cr
  73.  text "Press any key to return to DOS."
  74.  wait
  75.  exit
  76. endif
  77.  
  78. if !envdef(c)
  79.  text "No C environment variable! "@cr
  80.  text "To run BIGDEMO from DOS use GO.BAT"@cr
  81.  wait
  82.  exit
  83. endif
  84.  
  85. when ESC goto terminate 
  86.  
  87. set fs open(@t$"\mtd\midpak.adv")    ;How big is MIDPAK.ADV
  88. local advsize size(@fs)            ;stick it in ADVSIZE
  89. . close(@fs)
  90.  
  91. databegin                ;sizes of the wave drivers
  92. "44836"
  93. "10590" 
  94. "10816"
  95. "10590"
  96. "7178"
  97. "10590 "
  98. "39859"
  99. "end"
  100. dataend
  101.  
  102. local x @                ;grab first item into var
  103. advhop:
  104. if @x!="end"
  105.  if @x==@advsize
  106.   text "Using wave table synthesis for MIDI"@cr
  107.   set ext ".gen"
  108.   goto advdone
  109.  else
  110.   local x @
  111.   goto advhop
  112.  endif
  113. endif
  114. text "Using frequency modulation (FM) MIDI files"@cr
  115. set ext ".opl"
  116. advdone:
  117.  
  118. opengl @c$"\bigdemo\bigdemo.ovr"
  119. load midpak.grp digpak.grp               ;load grps
  120. closegl
  121. if !@0
  122.  text "Error loading GRP files"
  123.  wait
  124.  exit
  125. else
  126.  text "GRPs loaded..."$@cr
  127. endif
  128.  
  129. load _laser.raw
  130. digpak preloaded @_laser
  131. digpak play 
  132.  
  133. tt:
  134. digpak done
  135. if !@0
  136.  set trip 0
  137.  goto tt
  138. endif
  139. free laser
  140.  
  141. if @trip
  142.  text "Sound didn't play!!!!"@cr
  143.  wait 
  144.  exit
  145. else
  146.  text "Sound appears to be playing correctly"@cr
  147. endif
  148. midpak volume 100                      ;MIDPAK driver has internal vol control
  149.                     ;mixer levels for MIDI!!!
  150. text "Press Enter to start now"@cr@cr@cr
  151. text "At runtime pressing Enter will advance"@cr@cr@cr
  152. text "Press Esc at anytime to terminate"@cr@cr@cr
  153. text "Pausing for 10 seconds"
  154.  
  155. flushkey
  156.  
  157. ;. chdir("c:\\mtdsfx\\bigdemo")      ;Rob's hook - If you remove the 
  158. ;                      semicolon in front of the . then                
  159. ;                      BIGDEMO will look to the path inside
  160. ;                      the chdir string for digpak and midpak
  161. ;                      files
  162.  
  163. mark 10
  164.  wait 100
  165.  text "."
  166.  waitkey 0
  167.  getkey k name                       
  168.  if @k==return
  169.   return
  170.  endif
  171. loop
  172.  
  173. return                    ;--------------- end of init
  174.  
  175.  
  176. localise:                ;subroutine checks for flics on hd
  177.                     ;and copies them if possible.
  178. local ax 0 bx 0 cx 0 freebytes 0 chcnt 0 chfile " " downed 0
  179. local runcd 0
  180. global fromcd 0
  181. int 0x21 0x3600,,,0x0000        ;default drive
  182. if @ax==0xffff
  183.  text "Problem getting free disk space"
  184.  pause
  185.  exitnow
  186. endif
  187. set freebytes (@ax*@bx*@cx)/1000
  188. if @freebytes>=182000
  189.  set enuf 0
  190. else 
  191.  set enuf 1
  192. endif
  193.  
  194. color 0
  195. clearscr
  196. color 15
  197. window
  198.  
  199. databegin ckl
  200. loctop:
  201.  . chdir(@t$"\\mtdtemp")
  202.  set chfile @
  203.  if @chfile<>"end"
  204.   local temp open(@chfile)                               
  205.   if @temp                  
  206.    local success close(@temp)   
  207.   else
  208. ;   text @chfile$": file not found"$@cr
  209.    set downed 1
  210.   endif                     
  211. goto loctop
  212.  endif
  213.  . chdir(@t$"\\mtd")
  214. if @downed==0
  215.  text 0 0 "The requisite file have been found in MTDTEMP"
  216.  waitkey 100
  217.  set fromcd 1
  218.  global drive @t
  219.  return
  220. endif
  221. if @downed==1&&@enuf==0
  222.  databegin
  223.  "You have more than 180MB free on this drive! 
  224.  
  225.  
  226. Press C if you would like to run the MIDPAK BigDemo from the CD, or
  227.  
  228.  
  229. Press D to download the graphics to your hard disk for faster playback.
  230.  
  231.  
  232. Please press either C or D now:"
  233.  dataend
  234.  window
  235.  color 0
  236.  clearscr
  237.  color 15
  238.  text @
  239.  flushkey
  240.  waitkey
  241.  getkey k
  242.  if @k=="d"||"D"
  243.   set fromcd 1
  244.   set drive @t
  245.   download        ;go get the files...
  246.   return
  247.  endif  
  248.  if @k=="c"||"C"
  249.   global drive @c
  250. . chdir(@drive$"\\bigdemo")
  251.   return        ;play as per normal
  252.  endif
  253. endif
  254. if @enuf==1&&@downed==1
  255.   global drive @c
  256. . chdir(@drive$"\\bigdemo")
  257.   return        ;play as per normal
  258. endif
  259. return
  260.  
  261.  
  262. download:
  263. video m
  264. color 0
  265. window
  266. clearscr
  267. color 15
  268. exec c:\dos\xcopy.exe @c$"\\flics\\neumann\*.fli "$@t$"\\mtdtemp"
  269. video l
  270. return
  271.  
  272.  
  273.  
  274.  
  275. maxvol:
  276. midpak volume 100                      ;MIDPAK driver has internal vol control
  277. return
  278.  
  279.  
  280. playit:
  281. dload @1 d1 1 
  282. putdff d1 0 0 0 
  283. mark (d1->frames)-1
  284.  putdff d1 @playspeed @loop @loop
  285.  waitkey 0
  286.  getkey k name
  287.  if @k==return
  288.   set broken 1 
  289.   break playout
  290.  endif
  291. loop
  292. playout:
  293. dfree d1
  294. return
  295.  
  296.  
  297. mp:
  298. midpak use @c$"\\bigdemo\\"$@1$@ext
  299. midpak play
  300. return
  301.  
  302.  
  303. runmode:
  304. if @fromcd==1
  305.  set thispath "\\mtdtemp\\"
  306. endif
  307. return
  308.  
  309.  
  310. showcred:            ;shows credit screens
  311. pload @c$"\\bigdemo\\"$@1$".gif" p1 
  312. color 0
  313. pfade 12 0
  314. palette p1
  315. pfade 12 p1
  316. pfree p1
  317. waitkey @creddel
  318. pfade 12 0
  319. return
  320.  
  321.  
  322. terminate:
  323.  when esc
  324.  digpak quit                 ;implicit loading
  325.  midpak stop
  326.  free digpak midpak
  327. ; if def(spaceflag)
  328. ;  . chdir(@c$"\\spacebar")
  329. ;  link tmpfile.txt
  330. ; endif
  331. ; if @lmode==2            ;demo has reached end normally
  332. ;  local fs create(@t$"ends")
  333. ; else                ;was interupted by esc
  334. ;  local fs create(@t$"abort")
  335. ; endif
  336. ; local bw write(@fs,"A")
  337. ; if @bw!=1
  338. ;     text 0 0 "Problem writing"
  339. ;    waitkey
  340. ; endif
  341. ; . close(@fs)
  342. ; . chdir(@t$"\\mtd")
  343.  exitnow
  344.  
  345. writenear:                ;debugger
  346.  color 0
  347.  rect 400 200 500 230
  348.  color 15
  349.  text 400,220 "Used:"$@memused
  350.  text 400,210 "Tota:"$@memfree
  351.  text 400,200 "Near:"$@nearmem
  352. return
  353.  
  354.  
  355.  
  356.                     ;------------ start of data tables
  357. ckl:
  358. CHESS00.FLI
  359. CHESS01.FLI
  360. CHESS02.FLI
  361. CHESS03.FLI
  362. CHESS04.FLI
  363. CHESS05.FLI
  364. CHESS06.FLI
  365. CHESS07.FLI
  366. CHESS08.FLI
  367. CHESS09.FLI
  368. CHESS10.FLI
  369. CHESS11.FLI
  370. CHESS12.FLI
  371. CHESS13.FLI
  372. CHESS14.FLI
  373. CHESS15.FLI
  374. CHESS16.FLI
  375. CHESS17.FLI
  376. CHESS18.FLI
  377. CHESS19.FLI
  378. CHESS20.FLI
  379. CHESS21.FLI
  380. CHESS22.FLI
  381. CHESS23.FLI
  382. CHESS24.FLI
  383. CHESS25.FLI
  384. CHESS26.FLI
  385. CHESS27.FLI
  386. CHESS28.FLI
  387. CHESS29.FLI
  388. CHESS30.FLI
  389. CHESS31.FLI
  390. CHESS32.FLI
  391. CHESS33.FLI
  392. CHESS34.FLI
  393. CHESS35.FLI
  394. CHESS36.FLI
  395. CHESS37.FLI
  396. CHESS38.FLI
  397. CHESS39.FLI
  398. CHESS40.FLI
  399. CHESS41.FLI
  400. CHESS42.FLI
  401. CHESS43.FLI
  402. CHESS44.FLI
  403. PINBALL.FLI
  404. CHERNBO1.FLI
  405. ENTRANCE.FLI
  406. CHERNBO2.FLI
  407. CHERNBO3.FLI
  408. MELONFRM.FLI
  409. CAM01A.FLI
  410. CAM01B.FLI
  411. CAM02.FLI
  412. CAM03.FLI
  413. CAM04.FLI
  414. CAM05.FLI
  415. CAM06.FLI
  416. CAM07.FLI
  417. CAM08A.FLI
  418. CAM08B.FLI
  419. ECKGEH.FLI
  420. ECKRUMO.FLI
  421. JUMP01.FLI
  422. JUMP03.FLI
  423. JUMPAN.FLI
  424. RENGEH00.FLI
  425. RUECKMO.FLI
  426. SALTO01.FLI
  427. end 
  428.  
  429.  
  430. cherntab:
  431. 1,_gone,156
  432. 1,_gone2,225
  433. 1,_cable,466
  434. 1,_cable,486
  435. 1,_cable,555
  436. 1,_cable,577
  437. 1,_cable,682
  438. 2,_cable,26
  439. 2,_truss,210
  440. 2,_truss,345
  441. 2,_truss,480
  442. 2,_truss,553
  443. 2,_truss,625
  444. 2,_truss,680
  445. 3,_Slamc,20
  446. 3,_Slam2,60
  447. 3,_Slam3,104
  448. 3,_Lil,109
  449. 3,_Lil,115
  450. 3,_Lil,119
  451. 3,_Lil,125
  452. 3,_Lil,130
  453. 3,_Lil,135
  454. 3,_Lil,139
  455. 3,_Lil,144
  456. 3,_Lil,149
  457. 3,_Bigger,154
  458. 3,_Bigger,174
  459. 3,_Bigger,185
  460. 3,_Bigger,194
  461. 3,_Bigger,205
  462. 3,_Bigger,214
  463. 3,_Bigger,224
  464. 3,_Truss,301
  465. 3,_Truss,336
  466. 3,_Truss,376
  467. 3,_Truss,416
  468. 3,_Truss,456
  469. 3,_Truss,496
  470. 3,_TRI,541
  471. 3,_TRI,580
  472. 4,_TRI,20
  473. 4,_TRI,60
  474. 4,_TRI,100
  475. 4,_TRI,140
  476. 4,_TRI,181
  477. 4,_TRI,222
  478. 4,_TRI,262
  479. 4,_Slam3,573
  480. 4,_Slam4,628
  481. 4,_Arch,704
  482. 4,_Arch,714
  483. 4,_Arch,724
  484. 4,_Arch,734
  485. 4,_Arch,744
  486. 4,_Arch,754
  487. 4,_Arch,764
  488. 4,_Arch,774
  489. 4,_Arch,784
  490. 4,_Archm,799
  491. 4,_Stops,833
  492. 4,_Closes,842
  493. 4,_Arch2,953
  494. 4,_Arch2,984
  495. 4,_Arch2,1014
  496. 4,_Arch2,1044
  497. 4,_Arch2,1074
  498. 4,_Arch2,1104
  499. 4,_Arch2,1134
  500. 4,_Arch2,1164
  501. 4,_Arch2,1194
  502. 4,_Arch2,1224
  503. 4,_Arch2,1254
  504. 4,_Endcher,1370
  505. end
  506.  
  507. chesstable:
  508. 0,_C1,31
  509. 1,_C2,81
  510. 2,_C3,1
  511. 2,_C3,99
  512. 2,_C4,126
  513. 2,_C4,161
  514. 2,_C4,192
  515. 2,_C4,223
  516. 2,_C4,254
  517. 2,_C4,280
  518. 4,_C5,28
  519. 4,_C5,58
  520. 4,_C5,88
  521. 4,_C5,118
  522. 4,_C5,148
  523. 5,_C6,72
  524. 6,_C7,44
  525. 6,_C7,57
  526. 6,_C8,67
  527. 6,_C6,117
  528. 7,_C9,36
  529. 7,_C9,44
  530. 7,_C9,54
  531. 7,_C9,61
  532. 7,_C9,67
  533. 8,_C8,32
  534. 8,_C7,61
  535. 8,_C7,74
  536. 8,_C7,88
  537. 8,_C8,91
  538. 8,_C6,137
  539. 9,_C11,34
  540. 9,_C12,66
  541. 9,_C6,113
  542. 10,_C7,48
  543. 10,_C7,64
  544. 10,_C13,72
  545. 10,_C6,133
  546. 11,_C14,31
  547. 11,_C15,37
  548. 11,_C16,47
  549. 11,_C17,56
  550. 11,_C6,112
  551. 12,_C18,41
  552. 12,_C18,47
  553. 12,_C18,57
  554. 12,_C18,63
  555. 12,_C18,66
  556. 12,_C6,109
  557. 13,_C15,32
  558. 13,_C19,40
  559. 13,_C20,50
  560. 13,_C11,65
  561. 13,_C12,96
  562. 13,_C12,101
  563. 14,_C21,30
  564. 14,_C7,47
  565. 14,_C7,57
  566. 14,_C7,67
  567. 14,_C21,75
  568. 14,_C6,124
  569. 15,_C17,32
  570. 15,_C6,123
  571. 16,_C15,32
  572. 16,_C23,45
  573. 16,_C12,90
  574. 16,_C6,143
  575. 17,_C24,32
  576. 17,_C21,56
  577. 17,_C25,65
  578. 17,_C6,122
  579. 18,_c26,32
  580. 18,_c26b,42
  581. 18,_c27,67
  582. 18,_c6,122
  583. 19,_c28,32
  584. 19,_c29,73
  585. 19,_c6,136
  586. 20,_c30,42
  587. 20,_c30,61
  588. 20,_c30,81
  589. 20,_c30,101
  590. 20,_c31,111
  591. 20,_c30,156
  592. 20,_c30,162
  593. 20,_c6,202
  594. 21,_c28,32
  595. 21,_c32,49
  596. 21,_c33,63
  597. 21,_c29,81
  598. 21,_c6,122
  599. 22,_c30,51
  600. 22,_c30,61
  601. 22,_c34,85
  602. 22,_c6,165
  603. 23,_c28,32
  604. 23,_c35,73
  605. 23,_c36,81
  606. 23,_c38,136
  607. 23,_c6,196
  608. 24,_c39,32
  609. 24,_c40,73
  610. 24,_c6,134
  611. 25,_c28,32
  612. 25,_c41,51
  613. 25,_c6,132
  614. 26,_c30,51
  615. 26,_c30,72
  616. 26,_c42,82
  617. 26,_c43,102
  618. 26,_c30,137
  619. 26,_c6,178
  620. 27,_c38,32
  621. 27,_c29,106
  622. 27,_c6,147
  623. 28,_c45,44
  624. 28,_c6,104
  625. 29,_c47,29
  626. 29,_c48,54
  627. 29,_c49,82
  628. 29,_c6,139
  629. 30,_c30,51
  630. 30,_c50,70
  631. 30,_c51,111
  632. 30,_c30,131
  633. 30,_c6,172
  634. 31,_c52,32
  635. 31,_c53,58
  636. 31,_c53,70
  637. 31,_c53,82
  638. 31,_c52,95
  639. 31,_c6,152
  640. 32,_c54,41
  641. 32,_c54,51
  642. 32,_c54,61
  643. 32,_c54,71
  644. 32,_c54,76
  645. 32,_c6,116
  646. 33,_c55,32
  647. 33,_c6,147
  648. 34,_c39,32
  649. 34,_c56,50
  650. 34,_c56,60
  651. 34,_c56,70
  652. 34,_c39,83
  653. 34,_c57,102
  654. 34,_c6,143
  655. 35,_c28,32
  656. 35,_c29,91
  657. 35,_c6,132
  658. 36,_c58,32
  659. 36,_c59,40
  660. 36,_c60,48
  661. 36,_c57,79
  662. 36,_c6,120
  663. 37,_c58,32
  664. 37,_c58,71
  665. 37,_c58,91
  666. 37,_c58,101
  667. 37,_c6,144
  668. 38,_c58,32
  669. 38,_c59,40
  670. 38,_c61,48
  671. 38,_c6,132
  672. 39,_c62,22
  673. 39,_c6,101
  674. 40,_c56,43
  675. 40,_c56,60
  676. 40,_c39,90
  677. 40,_c62,32
  678. 40,_c6,142
  679. 41,_c62,32
  680. 41,_c63,51
  681. 41,_c64,61
  682. 41,_c6,113
  683. 42,_c56,30
  684. 42,_c65,52
  685. 42,_c57,71
  686. 42,_c6,113
  687. 44,_c67,32
  688. 44,_c59,49
  689. 44,_c57,68
  690. end
  691.  
  692.